DROP PROCEDURE IF EXISTS CREATE_Procedure;

DELIMITER $$

CREATE PROCEDURE CREATE_Procedure()
BEGIN
<#list ProcedureMySQL as p>
    <#if p.getMySQL()??>
        BEGIN
        DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
        BEGIN
        GET CURRENT DIAGNOSTICS CONDITION 1 @errno = MYSQL_ERRNO, @msg = MESSAGE_TEXT;
        select @errno,@msg;
        END;
        ${p.getMySQL()};
        END;
    </#if>
</#list>
END;
CALL CREATE_Procedure;
DROP PROCEDURE CREATE_Procedure;
$$